# -*- coding: utf-8 -*-
from __future__ import unicode_literals


# 企业主表更新时额外操作的函数
def save_signal_func(sender, **kwargs):
    from wlmodels.company.models import ELBasic, ELClass
    patch = kwargs['instance']
    basicinfos = ELBasic.objects.filter(entobj=patch)
    classinfos = ELClass.objects.filter(entobj=patch)
    if basicinfos.count() == 0:
        ELBasic.objects.create(entobj=patch)
    if classinfos.count() == 0:
        ELClass.objects.create(entobj=patch)
